1. Field of the Invention
The present invention relates to techniques for determining the power consumption of an electronic device, such as an integrated circuit (IC) chip. More specifically, the present invention relates to a method and apparatus for determining the power consumption of an electronic device by measuring an average output current generated by a switching regulator that supplies power to the electronic device.
2. Related Art
Rapid advances in computing technology presently make it possible to perform trillions of operations each second on data sets as large as a trillion bytes. These advances can be largely attributed to an exponential increase in the density and complexity of integrated circuits (ICs). Unfortunately, in conjunction with this increase in computational power, power consumption and heat dissipation of ICs has also increased dramatically.
Increasing power consumption and associated heat dissipation creates serious challenges for power management and cooling in computing devices, especially for portable computers. If the real-time power consumption of system components can be measured, the system can provision power to system components more intelligently, and can also adjust cooling mechanisms, for example, by increasing/decreasing fan speed, to more efficiently remove waste heat from the computer system.
Modern power supplies within computer systems often utilize switching regulators to provide a substantially constant voltage to drive system components, such as IC chips. A switching regulator typically comprises control logic, a switching circuit, and an “LC tank” circuit. The control logic typically generates two square-wave control signals that are complements of each other. The switching circuit typically includes at least one high-side switching metal-oxide-semiconductor field-effect transistor (MOSFET) and one low-side switching MOSFET, which are coupled in series. The two out-of-phase control signals from the control logic are coupled to the gates of the two switching MOSFETs to drive the two MOSFETs. Because each control signal switches between a high voltage and a low voltage, the two MOSFETs will be turned on and off periodically by the control signals.
To convert AC output currents from the MOSFETs into a DC voltage, the MOSFETs are coupled to the LC tank circuit. Specifically, when the high-side MOSFET is turned on and the low-side MOSFET is turned off, the output current flows through the inductor L and capacitor C. This causes energy to be stored within the inductor and the capacitor. A portion of the output current also drives the load. Next, when the high-side MOSFET is turned off and the low-side MOSFET is turned on, the energy stored within the inductor and the capacitor continues to provide a near DC drive current to the load.
Note that the output current from the switching regulator to the load can change dynamically during system operation. For example, the output current to a CPU typically increases as the utilization of the CPU increases, whereas the output current to the CPU decreases as the CPU utilization drops. During this time, the voltage on the load remains constant. Consequently, one can monitor the power usage of the load by monitoring the average output current from the switching regulator.
One technique to measure the average output current from the switching regulator is to insert a current sensing component, for example, an ammeter, in series with the load. However, this technique can cause significant amount of dissipative loss on the current sensor because the entire output current flows through this current-sensing component.
Another technique is to use a component that is already in series with the load to measure the output current. For example, one can obtain the output current by first measuring the voltage across inductor L and then computing the current by dividing the voltage by the resistance of inductor L. Unfortunately, the resistance of inductor L is typically not a constant and is difficult to measure. For example, this resistance can change significantly because of temperature variations.
Hence, what is needed is a method and an apparatus for determining the average output current from a switching regulator without the problems described above.